<template>
<div class="advertisement">
  <el-carousel height="150px">
    <el-carousel-item v-for="item in advertisements" :key="item.adId">
      <a :href="item.url" target="_blank">
        <img style="width: 100%;height: 100%" :src="item.poster" alt="">
      </a>
    </el-carousel-item>
  </el-carousel>
</div>
</template>

<script>
export default {
  name: "advertisement",
  props: {
    advertisements: Array
  },
  created() {
  }
}
</script>

<style lang="less" scoped>
.advertisement{
  width: 260px;
  background-color: #ffffff;
  margin: 10px;
  flex-shrink: 0;
}
</style>